<form method="post" name="form" id="form">
<script> 
function showT(idTabel){ 
var pilih = this.form.searchby.value;
var idtabel = document.getElementById(idTabel);
var jumBaris = idtabel.rows.length;
var baris = idtabel.insertRow(jumBaris);
var kolom = baris.insertCell(0);
//document.getElementById("tbl_search").disabled=false;
if(pilih=='...'){
	if(jumBaris>0){ idtabel.deleteRow(0); }
	//document.getElementById("tbl_search").disabled=true;
	}
if(pilih=='location'){
	if(jumBaris>0){ idtabel.deleteRow(0); }
	kolom.innerHTML = '<table width="100%"><tr><td align="left">BY LOCATION<br>Choos it.. <br>Select the suitable <br><input type="radio" name="listlocation" id="listlocation1" value="gebang" checked> Gebang <br><input type="radio" name="listlocation" id="listlocation2" value="mulyosari"> Mulyosari<br><input type="radio" name="listlocation" id="listlocation3" value="keputih"> Keputih <br><input type="radio" name="listlocation" id="listlocation4" value="other"> Other... </td></tr></table>';
	}
if(pilih=='price'){
	if(jumBaris>0){ idtabel.deleteRow(0);}
	kolom.innerHTML = '<table width="100%"><tr><td align="left">BY PRICE <br>Choose it.. <br>Select the suitable :) <br><input type="radio" name="listprice" id="listprice1" value="price1" checked> <200.000 <br><input type="radio" name="listprice" id="listprice2" value="price2"> 200.000-400.000 <br><input type="radio" name="listprice" id="listprice3" value="price3"> 400.000-500.000 <br><input type="radio" name="listprice" id="listprice4" value="price4"> 500.000-1.000.000 <br><input type="radio" name="listprice" id="listprice5" value="price5"> >1.000.000 </td></tr></table>'; 
	}
if(pilih=='facility'){
	if(jumBaris>0){ idtabel.deleteRow(0);}
	kolom.innerHTML = '<table width="100%"><tr><td align="left"><br>BY FACILITY <br>Choos it.. <br>Select the suitable <br><input type="radio" name="listfacility" id="listfacility1" value="ekonomi" checked> Ekonomi <br>&nbsp <small> *Tempattidur, Lemari, Meja </small> <br><input type="radio" name="listfacility" id="listfacility2" value="bisnis"> Bisnis <br> &nbsp <small> *ParkirMobil, TV, KM dalam </small> <br><input type="radio" name="listfacility" id="listfacility3" value="eksekutif"> Eksekutif <br> &nbsp <small> *AC, TV, Kulkas, Wifi, ParkirMobil, KM dalam </small> </td></tr></table>'; 
	}
if(pilih=='roomspace'){
	if(jumBaris>0){ idtabel.deleteRow(0);}
	kolom.innerHTML = '<table width="100%"><tr><td align="left">BY ROOMSPACE <br>Choos it.. <br>Select the suitable <br><input type="radio" name="listroomspace" id="listroomspace1" value="small" checked> Small <br><input type="radio" name="listroomspace" id="listroomspace2" value="medium"> Medium <br><input type="radio" name="listroomspace" id="listroomspace3" value="high"> High </td></tr></table>'; 
	}
if(pilih=='owner'){
	if(jumBaris>0){ idtabel.deleteRow(0);}
	kolom.innerHTML = '<table width="100%"><tr><td align="left">BY OWNERS <br>Please write owner name ^_^ <br><input type="text" name="owner" class="input-medium search-query"> </td></tr></table>'; 
	}
if(pilih=='others'){
	if(jumBaris>0){ idtabel.deleteRow(0);}
	kolom.innerHTML = '<table width="100%"><tr><td align="left">BY OTHERS <br>Find as you wish ^_^ <br><input type="text" name="other" class="input-medium search-query"> </td></tr></table>'; 
	}
} 
</script>

<table width="100%">
<tr bgcolor="deepskyblue"><td colspan="2"><strong>Searching Now ! </strong></td></tr>
<tr><td> &nbsp </td></tr>
<tr><td>Search_By: </td><td><select name="searchby" class="btn-medium" id="searchby" onChange="showT('advance');">
	<option value="...">Search by...</option>
    <option value="location">Location</option>
	<option value="price">Price</option>
    <option value="facility">Facility</option>
	<option value="roomspace">Roomspace</option>
    <option value="owner">Owner</option>
	<option value="others">Others</option>
</td></tr>
<tr><td></td><td align="center">
<table id="advance" width="100%">

</table>
</br><input class="btn btn-primary span2" name="tbl_search" type="submit" value="Search now" id="tbl_search">
</td></tr>
</table>
</form>
